
package com.wd.base.thread;

import java.util.ArrayList;
import java.util.List;

/**
 * <自动释放的 Runnable 对象持有器>
 *
 * @author wangnaiwen
 * @version [V1.0.0.0, 2020/5/23]
 * @since V1.0.0.0
 */
public final class AutoReleaseNestedHolder {
    private List<Object> nestedObject = new ArrayList();

    private AutoReleaseNestedHolder() {
    }

    public static AutoReleaseNestedHolder create() {
        return new AutoReleaseNestedHolder();
    }

    void deposit(Object obj) {
        this.nestedObject.add(obj);
    }
}
